#ifndef Q_PCL_PLUGIN_RANSACFILTER_HEADER
#define Q_PCL_PLUGIN_RANSACFILTER_HEADER

#include "BaseFilter.h"

class RansacDialog;

class Ransac : public BaseFilter
{
    Q_OBJECT

public:
    Ransac();
	virtual ~Ransac();

	//inherited from BaseFilter
	virtual int compute();

protected:

	//inherited from BaseFilter
    virtual int openDialog();
	virtual void getParametersFromDialog();

	RansacDialog* m_dialog;

	//Estimator
	QString estimator;

	// Maximum number of Iterations for RANSAC
	int max_iterations;
	//distance treshold for model
	float distance_treshold;
	//optimize model coefficients
	bool optimize_coefficients;
	
	//what models to find
	bool find_planes, find_lines, find_spheres, find_cylinders;

	//iterate over cloud
	bool iterate;
	int iterate_percentage;
	int iterate_numofmodels;

	//use normals for sac
	bool useNormals;

	//probability of choosing at least one sample free from outliers. 
	float probability;

	//axis along which we need to search for a model perpendicular to. 
	bool perpendicular_axis;
	float axis_x,axis_y,axis_z;
	float eps_treshold;

};

#endif // Q_PCL_PLUGIN_NORMALESTIMATION_HEADER
